package com.btpj.shop.dto.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 首页配置参数
 *
 * @author BTPJ
 */
@ApiModel("首页配置参数")
@Data
public class IndexConfigParam implements Serializable {

    @ApiModelProperty("配置的商品的名称")
    @Length(min = 1, max = 20, message = "配置项名称必须为1～20位字符")
    private String name;

    @ApiModelProperty("配置类型（1-搜索框热搜 2-搜索下拉框热搜 3-(首页)热销商品 4-(首页)新品上线 5-(首页)最新推荐）")
    @NotNull
    private Byte type;

    @ApiModelProperty("商品ID")
    @NotNull
    private Long goodsId;

    @ApiModelProperty("点击跳转的URL")
    @Length(min = 1, max = 200, message = "点击跳转的URL必须为1～100位字符")
    private String clickUrl;

    @ApiModelProperty("排序值（值越大越靠前）")
    @NotNull
    private Integer sort;

    private static final long serialVersionUID = 1L;
}